package us.icitap.commandcenter.business.ejb;

import java.util.Date;
import java.util.List;

import javax.ejb.Local;

import us.icitap.commandcenter.business.Result;
import us.icitap.commandcenter.business.ejb.dao.Expression;
import us.icitap.commandcenter.business.ejb.persistence.Call;
import us.icitap.commandcenter.business.ejb.persistence.CommandCenter;
import us.icitap.commandcenter.business.ejb.persistence.Dispatcher;
import us.icitap.commandcenter.business.ejb.persistence.UniqueNumber;

@Local
public interface IPersistenceBean {
	public <T> Result<T> saveEntity(T entity);
	public <T> Result<List<T>> getList(Class<T> entityClass, boolean withStatus, String orderBy);
	
	public Result<Call> createCall(Call call);
	public <T> Result<List<T>> findByCriteria(List<Expression> expressions,String groupByFields, String sortFields, Class<T> entity);
	public  Result<List<CommandCenter>> getCommandCenters();
	public Result<List<Dispatcher>> getDispatchers(CommandCenter cc);
	public <T> Result<T> findEntityById(Object id, Class<T> entity);
	public Result<List<Object[]>> findCallsTotalBasedOnStatus(CommandCenter commandCenter, Date minDate, Date maxDate);
	public Result<Long> findUniqueNumberTotal(CommandCenter commandCenter, Date minDate, Date maxDate);
	public Result<Call> generateUniqueNumber(Call call);

	/*public Result<Call> startVerification(Call call);
	public Result<Call> closeVerification(Call call);
	public Result<Call> changeCallStatus(Call call);
	public Result<Call> changeCallGrade(Call call);
	public Result<Call> correctCall(Call call);
	
	
	public Result<CommandCenter> createCommandCenter(CommandCenter commandCenter);
	public Result<CommandCenter> changeCommandCenterStatus(CommandCenter commandCenter);
	public Result<Dispatcher> addDispatcher(Dispatcher dispatcher);
	public Result<Dispatcher> changeDispatcherStatus(Dispatcher dispatcher);
	*/
	
}
